/*
    多路转接之select
*/
#include <string>
#include "select_server.hpp"

int main(int argc, char* argv[])
{
    if(argc != 2)
    {
        std::cerr << "use error: ./select_server port\n";
        return -1;
    }

    // 定义一个select服务
    std::unique_ptr<SelectServer> svr = std::make_unique<SelectServer>((uint16_t)std::stoi(argv[1]));
    svr->loop(); // 监听、派发、IO
    return 0;
}
